package com.jhgsys.internal.education.service;

import com.jhgsys.internal.base.dto.BaseCautionaryLessonDto;
import com.jhgsys.internal.common.entity.FebsResponse;
import com.jhgsys.internal.education.entity.EducationCautionaryLesson;
import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 *  Service接口
 *
 * @author yj
 * @date 2024-09-13 17:53:22
 */
public interface IEducationCautionaryLessonService extends IService<EducationCautionaryLesson> {
    /**
     * 查询（分页）
     * @author yj
     * @date 2024-09-13 17:53:22
     * @param request QueryRequest
     * @param educationCautionaryLesson educationCautionaryLesson
     * @return IPage<EducationCautionaryLesson>
     */
    IPage<EducationCautionaryLesson> findEducationCautionaryLessonPage(QueryRequest request, EducationCautionaryLesson educationCautionaryLesson);

    /**
     * 查询（所有）
     * @author yj
     * @date 2024-09-13 17:53:22
     * @param educationCautionaryLesson educationCautionaryLesson
     * @return List<EducationCautionaryLesson>
     */
    List<EducationCautionaryLesson> findEducationCautionaryLessonList(EducationCautionaryLesson educationCautionaryLesson);

    /**
    * 根据ID查询
    * @author yj
    * @date 2024-09-13 17:53:22
    * @param id
    * @return EducationCautionaryLesson
    */
    BaseCautionaryLessonDto findEducationCautionaryLessonById(String id);

    /**
     * 新增
     * @author yj
     * @date 2024-09-13 17:53:22
     * @param educationCautionaryLesson educationCautionaryLesson
     */
    boolean createEducationCautionaryLesson(EducationCautionaryLesson educationCautionaryLesson);

    /**
     * 修改
     * @author yj
     * @date 2024-09-13 17:53:22
     * @param educationCautionaryLesson educationCautionaryLesson
     */
    boolean updateEducationCautionaryLesson(EducationCautionaryLesson educationCautionaryLesson);

    /**
     * 逻辑删除
     * @author yj
     * @date 2024-09-13 17:53:22
     * @param educationCautionaryLesson educationCautionaryLesson
     * @param educationCautionaryLessonIds educationCautionaryLessonIds
     */
    boolean deleteEducationCautionaryLesson(EducationCautionaryLesson educationCautionaryLesson,String educationCautionaryLessonIds);

    /**
    * 物理删除
    * @author yj
    * @date 2024-09-13 17:53:22
    * @param educationCautionaryLessonIds educationCautionaryLessonIds
    */
    boolean physicallyDeleteEducationCautionaryLesson(String educationCautionaryLessonIds);

    /**
     * 其他业务模块调用，保存警示信息
     * @param tenantId
     * @param source 警示来源 1:事故管理 2：违章记分 3：隐患上报 4：安全检查
     * @param sourceId 业务数据主键id
     * @param sourceTitle 标题
     * @param stydyDeptId 需警示部门id
     * @param stydyDept 需警示部门名称
     * @param createBy 创建人
     */
    FebsResponse saveCautionaryLessonFromOthers(String tenantId, String source, String sourceId, String sourceTitle, String stydyDeptId, String stydyDept, String createBy);
}
